import request from '@/utils/request'

export const LineSectionFenceApi = {
  /**
   *  分页列表
   * @returns
   */
  getPage: (data) => {
    return request({
      url: '/manage/intercity/sectionFence/getPage',
      data,
      method: 'post'
    })
  },

  /**
   *  更新排序
   * @returns
   */
  updateSort: (data) => {
    return request({
      url: '/manage/intercity/sectionFence/updateSort',
      data,
      method: 'post'
    })
  },

  /**
   *  更新状态
   * @returns
   */
  updateStatus: (data) => {
    return request({
      url: '/manage/intercity/sectionFence/updateStatus',
      data,
      method: 'post'
    })
  },
  /**
   *  删除
   * @returns
   */
  delete: (lineSectionFenceId) => {
    return request({
      url: '/manage/intercity/sectionFence/delete',
      params:{lineSectionFenceId},
      method: 'get'
    })
  },

  /**
   *  获取详细信息
   * @returns
   */
  getInfoById: (lineSectionFenceId) => {
    return request({
      url: '/manage/intercity/sectionFence/getInfoById',
      params:{lineSectionFenceId},
      method: 'get'
    })
  },

  /**
   *  更新
   * @returns
   */
  update: (data) => {
    return request({
      url: '/manage/intercity/sectionFence/update',
      data,
      method: 'post'
    })
  },

  /**
   *  插入
   * @returns
   */
  insert: (data) => {
    return request({
      url: '/manage/intercity/sectionFence/insert',
      data,
      method: 'post'
    })
  },

  /**
   *  设置时间段围栏
   * @returns
   */
  setSectionFence: (data) => {
    return request({
      url: '/manage/intercity/sectionFence/setSectionFence',
      data,
      method: 'post'
    })
  }

}
